package study.web.service.jaxws.client;

import study.web.service.jaxws.impl.WeatherImpl;
import study.web.service.jaxws.impl.WeatherImplService;

/**  
* @Name: WeatherClient
* @Description: 使用jaxws调用webservice的客户端
* @Author: 李超
* @version 1.0
* @Create Date: 2017-01-06
*/
public class WeatherClient {
	
	public static void main(String[] args) {
		//1、创建服务视图对象
		WeatherImplService weatherImplService = new WeatherImplService() ;
		//2、通过服务视图对象，创建portType对象
		WeatherImpl weatherImpl = weatherImplService.getWeatherImplPort() ;
		//3、通过portType对象，调用服务方法
		String cityName = "北京" ;
		String result = weatherImpl.queryWeather(cityName) ;
		System.out.println("from server ... " + result);
	}

}
